<template>
  <avue-crud :data="data"
             :option="option">
    <template #name-error="{error}">
      <p style="color:green">自定义提示{{error}}</p>
    </template>
  </avue-crud>
</template>

<script>
export default {
  data () {
    return {
      user: {},
      data: [
        {
          sex: '男'
        }, {
          sex: '女'
        }
      ],
      option: {
        column: [
          {
            label: '姓名',
            prop: 'name',
            rules: [{
              required: true,
              message: "请输入姓名",
              trigger: "blur"
            }]
          },
          {
            label: '性别',
            prop: 'sex'
          }
        ]
      },
    };
  },
}
</script>